#! -*- coding:UTF-8 -*-
import math

d = []

t = {}
t['disease_name'] = '乌鸦'
t['disease_id'] = 22
t['pop'] = 6.1
t['weight'] = 6.1
d.append(t)

t = {}
t['disease_name'] = '家雀'
t['disease_id'] = 21
t['pop'] = 5.0
t['weight'] = 6.1
d.append(t)

t = {}
t['disease_name'] = '孔雀'
t['disease_id'] = 33
t['pop'] = 5.0
t['weight'] = 10
d.append(t)

d.sort(lambda a, b: (1 if b.get('pop') - a.get('pop') > 0 else -1) if a.get('weight') == b.get('weight') else (1 if b.get('weight') - a.get('weight') > 0 else -1))

print d
